package org.cc.cloud;

import org.cc.cloud.contract.MyUrl;
import org.cc.cloud.hystrix.FeignClientFallBack;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

//@FeignClient("first-provider")
@FeignClient(name="first-provider",fallback=FeignClientFallBack.class)
public interface ProviderClient {
	@RequestMapping(method = RequestMethod.GET, value = "/hello/{name}")
	public String  hello(@PathVariable("name") String  name);//fegin@PathVariable("name")不能缺少
	
	@MyUrl(url = "/hellown", method = "GET")
	public String  hellown();
	@RequestMapping(method = RequestMethod.GET, value = "//hellown")
	public String toHello();
	
	@RequestMapping(method = RequestMethod.GET, value = "/call/{id}")
	public String  call(@PathVariable("id") Integer  id);
}
